<?php
			session_start();
			header("Cache-Control: no-cache, must-revalidate");
			header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
			header("Content-type: image/png");
			$time=time();
			$im = imagecreate(60, 20);
			$white = imagecolorallocate($im, 255, 255, 255);
			$black = imagecolorallocate($im, 100, 100, 100);
			for ($i=1; $i<=30; $i++)
			{
				imageString($im,1,mt_rand(1,60),mt_rand(1,20),"*",imageColorAllocate($im,mt_rand(150,255),mt_rand(150,255),mt_rand(150,255))); 
			}
			$font ='simfang.ttf';
			//$font='simfang.ttf';
			$str='1234567890';
			for ($i=0; $i<6; $i++)
			{
				$text.= $str{mt_rand(0,strlen($str)-1)};
			}
			$_SESSION['check'] = array();
			$_SESSION['check']['mdfivevalue'] = md5($text);
			$_SESSION['check']['maxfailtime'] =$time + 600;
			imagettftext($im, 14, 0, 1, 18, $black, $font, $text);
			imagepng($im);
			imagedestroy($im);
?>